const arr = [1, 2, [3, 4, 5, [6, [7]]]];

const arrStr = arr.toString();

const aa = /[\[\]]/g;
const result = arrStr.replace(aa, "");

console.log(result);

// 对象方法
const Obj = {
  name: "zs",
  address: {
    city: "黄冈市",
    cun: "penggangcun",
  },
};
const {
  address: { city: city2 },
} = Obj ?? {};

console.log(city2);
console.log(Object.entries(Obj));
console.log(Object.values(Obj));
console.log("values" + Object.values(Obj));

// undfined 就会报错。
